/*
package com.star.gc4.controller;


import com.star.gc4.common.MailUtil;
import com.star.gc4.common.R;
import com.star.gc4.common.VerCodeGenerateUtil;
import com.star.gc4.dto.UserDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@RestController
@RequestMapping("/email")
public class mailController {
    @Autowired
    private MailUtil mailUtil;


    @RequestMapping ("/mail")
    public R<String> sendSimpleMail(@RequestBody UserDto userDto) {
        String verCode = VerCodeGenerateUtil.generateVerCode();

        mailUtil.sendSimpleMail(userDto.getMail(), "在线音乐播放器注册","尊敬的用户,您好:\n"
                + "\n本次请求的邮件验证码为:" + verCode + ",本验证码 5 分钟内效，请及时输入。（请勿泄露此验证码）\n"
                + "\n如非本人操作，请忽略该邮件。\n(这是一封通过自动发送的邮件，请不要直接回复）");


        return R.success("发送成功！");

    }


}
*/
